//
// Created by ✎﹏ℳ๓独赏 ☆独醉 on 2023/2/23.
//
#include <stdio.h>
#include <string.h>


int main(){
    printf("String Test:\n");
    char arr01[]="abc";
    char arr02[]={'a','b','c'};
    char arr03[]={'a','b','c','\0'};
    printf("Value of arr01:%s\n",arr01);
    printf("Value of arr02:%s\n",arr02);
    printf("Value of arr03:%s\n",arr03);
    //\0是字符串的结束标志，以arr01方式存储的字符串末尾会默认存在\0
    printf("\n");
    //strlen不统计\0
    printf("The string length of arr01:%d\n",strlen(arr01));
    printf("The string length of arr02:%d\n",strlen(arr02));
    printf("The string length of arr03:%d\n",strlen(arr03));
    printf("Test complete\n\n\n");



    //转义字符练习
    printf("Escape character test:\n");
    printf("\\n\n");
//    printf("D:\Dev c++\Item\C_Study\day02");报错
    printf("D:\\Dev c++\\Item\\C_Study\\day02\n");
//    printf(''');报错
    printf("%c\n",'a');
    printf("%c\n",'\'');
    printf("Test complete\n\n\n");

    return 0;
}